package main

import (
	"engine"
	"scheduler"
	parser "smarthome-parser"
	saver "smarthome-persist"
)

const SEEDURL = "https://wh2smarthome.hwcloudtest.cn/device/guide/"

func main() {
	e := engine.ConcurrentEngine{
		Scheduler:  &scheduler.QueuedScheduler{},
		NumWorkers: 1,
		ItemChan:   saver.ProdConfigSaver("/Volumes/Lighting/data/"),
	}
	e.Run(engine.Request{
		CurURL: SEEDURL,
		ParserFunc: func(content []byte) engine.ParserResult {
			return parser.ParseGuidePage(content, SEEDURL)
		},
	})
}
